package com.example.blog.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.example.blog.pojo.SendHomeWork;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface SendHomeWorkMapper extends BaseMapper<SendHomeWork> {
    @Select("select s.nickname,s.create_time,s.subject,s.valuation,s.score " +
            "from send_homework s where user_id=#{userId},homework_id=#{SendHomeworkId} order by score desc;")
    List<SendHomeWork> getRankScore(@Param("user_id") Integer userId, @Param("homework_id") int SendHomeworkId);
}
